/* webview/css/layout.css */
body {
    display: flex;
    flex-direction: column;
}

/* 上半部分：显示区 */
#display-area {
    flex-grow: 1;
    overflow-y: auto;
    padding: var(--gap-medium);
    position: relative;
}

.view-content { display: none; height: 100%; }
.view-content.active { display: block; }

/* 下半部分：控制区 */
#control-area {
    flex-shrink: 0;
    border-top: 1px solid var(--vscode-panel-border);
    background-color: var(--vscode-sideBar-background);
    padding: var(--gap-medium);
    display: flex;
    flex-direction: column;
    gap: var(--gap-small);
    position: relative; /* 为工具下拉菜单提供定位上下文 */
}

#command-bar {
    display: flex;
    justify-content: flex-start;
    gap: var(--gap-small);
    align-items: center;
}

.assist-mode-control {
    position: relative;
}

.assist-mode-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.assist-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 140px;
    background: var(--vscode-dropdown-background);
    border: 1px solid var(--vscode-dropdown-border);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 30;
    display: none;
}

.assist-dropdown.show {
    display: block;
}

.assist-option {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
}

.assist-option:hover {
    background: var(--vscode-list-hoverBackground);
}

.assist-option.selected {
    background: var(--vscode-list-activeSelectionBackground);
    color: var(--vscode-list-activeSelectionForeground);
}

.method-selector {
    position: relative;
    margin: var(--gap-small) 0;
}

#method-dropdown-button {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
}

#method-dropdown-button::part(control) {
    border: none;
    box-shadow: none;
}

.dropdown-caret {
    margin-left: auto;
}

.method-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 20;
    width: 100%;
    min-width: 100%;
    max-width: none;
}

.method-option {
    padding: 8px 12px;
    cursor: pointer;
}

.method-option:hover {
    background-color: var(--vscode-list-hoverBackground, rgba(255,255,255,0.05));
}

.method-option-name {
    font-weight: 600;
}

.method-option-meta {
    font-size: 12px;
    color: var(--vscode-descriptionForeground, #aaa);
}

#input-bar {
    position: relative;
    display: flex;
    width: 100%;
    align-items: stretch;
    gap: var(--gap-small);
}

#user-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    flex-grow: 1;
    min-height: 50px;
    max-height: 200px;
}

#send-button {
    min-width: 140px;
}

#send-button::part(control) {
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: center;
    justify-content: center;
}
